package Yang.mapper;

import Yang.pojo.User;
import lombok.Setter;
import org.mybatis.spring.SqlSessionTemplate;

import java.util.List;

public class UserMapperImpl implements UserMapper{
    //我们的所有操作，原先都使用sqlSession来执行，现在都使用SqlSessionTemplate；
    @Setter
    private SqlSessionTemplate sqlSession;

    @Override
    public List<User> selectUser() {
        UserMapper mapper = sqlSession.getMapper(UserMapper.class);
        return mapper.selectUser();
    }
}
